package community.hospital.entity.request;

import community.hospital.annotation.IsPhone;
import community.hospital.common.Add;
import community.hospital.common.BaseIndex;
import community.hospital.common.Update;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;

import java.io.Serializable;


/**
 * @Author：ydj
 * @Date：2023/1/27 15:22
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class HospitalRequest extends BaseIndex implements Serializable {

    private static final long serialVersionUID = -1442341990917838399L;
    @NotBlank(message = "医院名称不能为空",groups = {Add.class, Update.class})
    private String name;
    @NotBlank(message = "医院地址不能为空",groups = {Add.class, Update.class})
    private String address;
    @NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class})
    @IsPhone
    private String phone;
    private String image;
    @NotBlank(message = "医院等级不能为空",groups = {Add.class, Update.class})
    private String level;
    @NotBlank(message = "医院描述不能为空",groups = {Add.class, Update.class})
    private String description;
    @NotBlank(message = "统一社会凭证代码不能为空",groups = {Add.class})
    @Null(message = "统一社会凭证代码不能被修改",groups = {Update.class})
    private String creditCode;



}
